<template>
  <el-dialog
    top="30px"
    width="1000px"
    append-to-body
    :close-on-click-modal="false"
    :before-close="beforeClose"
    :visible.sync="visible"
  >
    <main-cmpt v-bind="$attrs" ref="view"></main-cmpt>
  </el-dialog>
</template>

<script>
import MainCmpt from '@/gov/views/bus/import/class/MainBusinessView'

export default {
  components: {
    MainCmpt,
  },
  props: {
    visible: Boolean,
  },
  data() {
    return {}
  },
  computed: {},
  watch: {
    visible() {
      if (this.visible) {
        this.$nextTick(() => {
          this.$refs.view.getData()
        })
      }
    },
  },
  created() {},
  mounted() {},
  methods: {
    beforeClose() {
      this.$emit('update:visible', false)
    },
  },
}
</script>

<style lang="scss" scoped></style>
